﻿using System.Configuration;
using System.Web.Optimization;

namespace XRM.Security.WebUI
{
    public class BundleConfig
    {
        private static string GetVersionedContent(string url)
        {
            string v = ConfigurationManager.AppSettings["ScriptVersion"];
            return url + "?v=" + v;
        }

        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles( BundleCollection bundles )
        {
            bundles.Add( new ScriptBundle( "~/bundles/common" ).Include(
                        "~/Scripts/jquery-2.1.1.js",
                        "~/Scripts/jquery-ui-{version}.js",
                        "~/Scripts/datepicker-ru.js",
                        "~/Scripts/bootstrap.js",
                        "~/Scripts/XRM.Security.Common.js",
                        "~/Scripts/metisMenu.js",
                        "~/Scripts/DialogForm.js",
                        "~/Scripts/rtz2fix.js"));

            bundles.Add( new ScriptBundle( "~/bundles/jqueryval" ).Include(
                        "~/Scripts/jquery.unobtrusive*",
                        "~/Scripts/jquery.validate*" ) );

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add( new ScriptBundle( "~/bundles/modernizr" ).Include(
                        "~/Scripts/modernizr-*" ) );
            
			bundles.Add( new ScriptBundle( "~/bundles/gridlibrary" ).Include(
                        "~/Scripts/jquery.dataTables.js",
                        "~/Scripts/dataTables_plugin.js",
                        "~/Scripts/dataTables.bootstrap.js" ) );
            bundles.Add( new StyleBundle( "~/Content/css" ).Include(
                "~/Content/css/bootstrap.css",
                "~/Content/fonts/font-awesome-4.1.0/css/font-awesome.css",
                "~/Content/css/sb-admin-2.css",
                "~/Content/css/metisMenu.css",
                "~/Content/css/custom.css" ) );

            bundles.Add(new StyleBundle("~/bundles/jquery-css").Include(
                        "~/Content/themes/base/core.css",
                        "~/Content/themes/base/resizable.css",
                        "~/Content/themes/base/selectable.css",
                        "~/Content/themes/base/accordion.css",
                        "~/Content/themes/base/autocomplete.css",
                        "~/Content/themes/base/button.css",
                        "~/Content/themes/base/dialog.css",
                        "~/Content/themes/base/slider.css",
                        "~/Content/themes/base/tabs.css",
                        "~/Content/themes/base/datepicker.css",
                        "~/Content/themes/base/progressbar.css",
                        "~/Content/themes/base/theme.css" ) );
        }
    }
}